package com.mrgood;

import com.mrgood.config.Context;
import com.mrgood.rest.ServiceB;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableFeignClients
@SpringBootApplication
public class SvcA {
    @Autowired
    ServiceB serviceB;

    private static final Logger logger = LoggerFactory.getLogger(SvcA.class);

    public static void main(String[] args) {
        SpringApplication.run(SvcA.class, args);
    }
    @GetMapping("/patha")
    public String get() {
        Context context = new Context();
        context.mark("svc-a", "0.4");
        return context.push(serviceB.get1("zhangsan"));
    }
}
